package cn.gok.demo.Controller;

import cn.gok.demo.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @ClassName AnoController
 * @Description TODO
 * @Author HP
 * @Date 11:33 2022/7/14
 * @Version 1.0
 **/
@RestController
public class AnoController {
    @Autowired
    @Resource
    @Qualifier
    private Student student;

    @RequestMapping("/method1")
    public Student method1(@RequestBody Student student1) {
        return student;
    }

    @GetMapping("/method2")
    public String method2() {
        return "method2";
    }

    @PostMapping("/method3")
    public String method3() {
        return "method3";
    }

    @RequestMapping(value = "/method4", method = RequestMethod.POST)
    public String method4() {
        return "method4";
    }


}
